package com.sdx.demo.service;

import java.util.List;

import org.beetl.sql.core.engine.PageQuery;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibeetl.admin.core.util.PlatformException;

import com.sdx.demo.dao.DemoBaseDao;
import com.sdx.demo.entity.DemoBase;
import com.ibeetl.admin.core.service.BaseService;

/**
 * 样例 Service
 */

@Service
@Transactional
public class DemoBaseService extends BaseService<DemoBase>{

    @Resource
	private DemoBaseDao demoBaseDao;

    public PageQuery<DemoBase>queryByCondition(PageQuery query){
        PageQuery ret =  demoBaseDao.queryByCondition(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public void batchDelDemoBase(List<String> ids){
        try {
            demoBaseDao.batchDelDemoBaseByIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除样例失败", e);
        }
    }
}